home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / info-service / www / src / WWW / Daemon / Implementation / HTSInit.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-06-21  |  2.5 KB  |  88 lines

  1. /*        Configuration-specific Initialialization    HTSInit.c
  2. **        ----------------------------------------
  3. ** This file is for a server.
  4. */
  5.  
  6. /* Implements: */
  7.  
  8. #include "HTInit.h"
  9.  
  10.  
  11. /*    Define a basic set of suffixes and presentations
  12. **    ------------------------------------------------
  13. */
  14.  
  15. /* #include "HTML.h"    */
  16. /* #include "HTPlain.h"    */
  17.  
  18. #include "HTMLGen.h"
  19. #include "HTFile.h"
  20. #include "HTFormat.h"
  21.  
  22. #include "HTMIME.h"
  23. #include "HTWSRC.h"
  24.  
  25. PUBLIC void HTFormatInit NOARGS
  26. {
  27.  
  28.  HTSetConversion("www/mime",  "*",           HTMIMEConvert,     1.0, 0.0, 0.0);
  29.  HTSetConversion("application/x-wais-source",
  30.                "*",           HTWSRCConvert,     1.0, 0.0, 0.0);
  31.  HTSetConversion("text/plain", "text/html",  HTPlainToHTML,    1.0, 0.0, 0.0);
  32. }
  33.  
  34.  
  35.  
  36. /*    Define a basic set of suffixes
  37. **    ------------------------------
  38. **
  39. **    The first suffix for a type is that used for temporary files
  40. **    of that type.
  41. */
  42.  
  43. #ifndef NO_INIT
  44. PUBLIC void HTFileInit NOARGS
  45. {
  46.     
  47.     HTSetSuffix(".mime","www/mime", "binary", 1.0);    /* Internal -- MIME is not recursive */
  48.     
  49.     HTSetSuffix(".PS",    "application/postscript", "8bit", 0.8);
  50.     HTSetSuffix(".eps",    "application/postscript", "8bit", 0.8);
  51.     HTSetSuffix(".ai",    "application/postscript", "8bit", 0.5);
  52.     HTSetSuffix(".ps",    "application/postscript", "8bit", 0.8);
  53.     HTSetSuffix(".execme.csh", "application/x-csh", "7bit", 0.5);
  54.     HTSetSuffix(".html","text/html", "8bit", 1.0);
  55.  
  56.     HTSetSuffix(".c",    "text/plain", "7bit", 0.5);
  57.     HTSetSuffix(".h",    "text/plain", "7bit", 0.5);    /* html better */
  58.     HTSetSuffix(".m",    "text/plain", "7bit", 0.5);    /* Objective-C code */
  59.     HTSetSuffix(".txt", "text/plain", "7bit", 0.5);
  60.  
  61.     HTSetSuffix(".rtf",    "application/x-rtf", "7bit", 1.0);
  62.     
  63.     HTSetSuffix(".src",    "application/x-wais-source", "7bit", 1.0);
  64.     
  65.     HTSetSuffix(".snd", "audio/basic", "binary", 1.0);
  66.     
  67.     HTSetSuffix(".bin",    "application/octet-stream", "binary", 1.0);    /* @@@@@@@@@@@@@@@@ */
  68.  
  69.     HTSetSuffix(".Z",    "application/x-compressed", "binary", 1.0);    /* @@@@@@@@@@@@@@@@ */
  70.     
  71.     HTSetSuffix(".gif", "image/gif", "binary", 1.0);
  72.  
  73.     HTSetSuffix(".tiff","image/x-tiff", "binary", 1.0);
  74.     
  75.     HTSetSuffix(".jpg", "image/jpeg", "binary", 1.0);
  76.     HTSetSuffix(".JPG", "image/jpeg", "binary", 1.0);
  77.     HTSetSuffix(".JPEG","image/jpeg", "binary", 1.0);
  78.     HTSetSuffix(".jpeg","image/jpeg", "binary", 1.0);
  79.     
  80.     HTSetSuffix(".MPEG","video/mpeg", "binary", 1.0);
  81.     HTSetSuffix(".mpg","video/mpeg", "binary", 1.0);
  82.     HTSetSuffix(".MPG","video/mpeg", "binary", 1.0);
  83.     HTSetSuffix(".mpeg","video/mpeg", "binary", 1.0);
  84.  
  85. }
  86. #endif /* NO_INIT */
  87.  
  88.